package com.it.commicity;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;

//排除 Spring Boot 的默认安全自动配置。Spring Boot 默认引入了 spring-boot-starter-security
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class })
@MapperScan("com.it.commicity.mapper")//自动扫描指定包下的Mapper接口
public class ItcommicityApplication {

    public static void main(String[] args) {
        SpringApplication.run(ItcommicityApplication.class, args);
    }
    @Bean
    public BCryptPasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }

}
